﻿using System.Data.SqlClient;

namespace DataScripter.Util
{
    static class ConnectionStringHelper
    {
        public static void ExtractServerAndDatabase(string connectionstring, out string server, out string database)
        {
            SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(connectionstring);
            server = builder.DataSource;
            database = builder.InitialCatalog;
        }
    }
}
